package com.surekam.dma.entity.content;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.surekam.dma.entity.IdEntity;

/**
 * @author wanghong
 *
 */
@Entity
//表名与类名不相同时重新定义表名.
@Table(name ="CONTENTINFO")
//默认的缓存策略.
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Directory extends IdEntity{
	
	private int pid;//父节点的id
	private String name;//节点名称
	private String url;//链接地址
	private String desc;//描述
	private int ordernum;//排序序号
	private int shownum;//显示序号
	public int getPid() {
		return pid;
	}
	public void setPid(int pid) {
		this.pid = pid;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	@Column(name = "describe")
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	public int getOrdernum() {
		return ordernum;
	}
	public void setOrdernum(int ordernum) {
		this.ordernum = ordernum;
	}
	public int getShownum() {
		return shownum;
	}
	public void setShownum(int shownum) {
		this.shownum = shownum;
	}
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
	 
}
